package com.yuexiang.melodyhub.common.result;

import com.yuexiang.melodyhub.common.constant.UsualConstant.BizCodeConstant;
import lombok.Getter;

@Getter
public enum ReturnCode {

    RC200(BizCodeConstant.Code.SUCCESS_CODE, BizCodeConstant.Msg.SUCCESS_MSG),
    RC500(BizCodeConstant.Code.FAILURE_CODE, BizCodeConstant.Msg.FAILURE_MSG),
    EMAIL_CODE_EXCEPTION(BizCodeConstant.Code.FREQUENT_VISITS_CODE, BizCodeConstant.Msg.FREQUENT_VISITS_MSG),
    UNAUTHORIZED(BizCodeConstant.Code.UNAUTHORIZED_CODE, BizCodeConstant.Msg.UNAUTHORIZED_MSG),
    FORBIDDEN(BizCodeConstant.Code.FORBIDDEN_CODE, BizCodeConstant.Msg.FORBIDDEN_MSG),
    FEIGN_SERVER_NOT_USE(BizCodeConstant.Code.FAILURE_CODE, BizCodeConstant.Msg.FEIGN_SERVER_NOT_USE_MSG),
    TOKEN_IS_INVALID(BizCodeConstant.Code.UNAUTHORIZED_CODE, BizCodeConstant.Msg.TOKEN_IS_INVALID_MSG);

    private final int code;

    private final String msg;

    ReturnCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
